/**
 * Created by yanghaijin on 2018/5/12.
 */
let Contants = {};

Contants.Code = {
    Login: 2001,
    CreateRoom: 3001,
    JoinRoom: 3002,
    LeaveRoom: 3003,
    DissolveRoom: 1111,
};

Contants.ErrorCode = {};
Contants.ErrorCode.Login_DB_Error = 0; // 登录数据库错误
Contants.ErrorCode.Other_Logined = 1; // 在别处登录

Contants.ErrorCode.Room_Full = 101;         // 房间人数已满
Contants.ErrorCode.Room_Nonexistence = 102; // 房间不存在
Contants.ErrorCode.Room_ID_Error = 103; // 没有输入正确的房间号

Contants.CodeString = {};
Contants.CodeString[Contants.Code.JoinRoom] = "成功加入房间！";
Contants.CodeString[Contants.Code.LeaveRoom] = "成功离开房间！";
Contants.CodeString[Contants.Code.CreateRoom] = "成功创建房间！";
Contants.CodeString[Contants.ErrorCode.Login_DB_Error] = "数据库错误";
Contants.CodeString[Contants.ErrorCode.Other_Logined] = "账号已经在别处登录了";
Contants.CodeString[Contants.ErrorCode.Room_Full] = "该房间已经满员了";
Contants.CodeString[Contants.ErrorCode.Room_Nonexistence] = "房间不存在";
Contants.CodeString[Contants.ErrorCode.Room_ID_Error] = "没有输入正确的房间号";

module.exports = Contants;

Contants.MAP_ID = {
    SPELL_THREE: 1,
    HALF_PAST_TEN: 2
};